#ifndef __INFRA_U_LIST_PRIV_H__
#define __INFRA_U_LIST_PRIV_H__

#include <linux/types.h>
#include <pthread.h>

#include "infra_tiny_block.h"
#include "infra_dl_list.h"
#include "infra_list.h"

typedef struct _infra_list_ctx {
    char                        _token[32];
    uint32_t                    _max_size;
    uint32_t                    _depth;
    uint32_t                    _data_count;
    uint32_t                    _in_count;
    uint32_t                    _out_count;
    infra_tb_handle             _tb_handle;
    struct infra_dl_list_head   _list;
    bool                        _is_block;
    pthread_mutex_t             _lock;
    pthread_mutexattr_t         _lock_attr;
    pthread_cond_t              _cond;
    pthread_condattr_t          _cond_attr;

    void                        *_pgb_userdata;      /* giveback callback userdata */
    void                        *_pnt_userdata;      /* notify callback userdata */
    pfn_infra_list_gb_cb        _pfn_giveback_cb;
    pfn_infra_list_nt_cb        _pfn_notify_cb;
} infra_list_ctx_t;

typedef struct _infra_list_node {
    struct infra_dl_list_head   list;
    void *data;
} infra_list_node_t;


#endif	/* __INFRA_U_LIST_PRIV_H__ */